package com.brillilab.domain.enums.lab;

/**
 * 实验室成员权限枚举
 *
 * @author lj
 */
public class LabMemberPowerEnum {

    public static final String reagent ="reagent";
    public static final String notice="notice";
    public static final String order_approve="order_approve";
    public static final String order_receive="order_receive";
    public static final String method="method";
    public static final String instrument_manage="instrument_manage";
    public static final String user_manage="user_manage";


    /**
     * 实验室成员权限
     */
    public static enum Power {
        REAGENT("试剂管理","reagent"),NOTICE("公告管理","notice"),ORDER_APPROVE("审核订单","order_approve"),
        ORDER_RECEIVE("购买订单","order_receive"),METHOD("方法管理","method"),
        INSTRUMENT_MANAGE("仪器管理","instrument_manage"),USER_MANAGE("用户管理","user_manage"),
        RESEARCH_GROUP_MANAGE("团队管理","research_group_manage");

    	private String key;
        private String value;

        private Power(String key,String value) {
            this.key=key;
            this.value=value;
        }

        public String getKey() {
            return key;
        }

        public static String getKey(String value) {
            for (Power p : Power.values()) {
                if(p.getValue().equals(value)){
                    return p.key;
                }
            }
            return null;
        }

        public String getValue() {
            return value;
        }
    }

}
